CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
CMAKE_POLICY(SET CMP0003 NEW)
CMAKE_POLICY(SET CMP0048 NEW)

project(pbft)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

IF (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /GF")
    ADD_DEFINITIONS(-DUNICODE -D_UNICODE -D_SCL_SECURE_NO_WARNINGS
        -D_CRT_SECURE_NO_WARNINGS -D_WIN32_WINNT=0x0600)
ELSE()
    SET(EXTRA_LINK_LIBS -lpthread)
ENDIF()

INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/lib/export/include)

ADD_SUBDIRECTORY(lib)
ADD_SUBDIRECTORY(test)
